package com.nuoniu.sibanyun.entity.erp;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;

/**
 * <p>
 * 币种记账详情
 * </p>
 *
 * @author baiqiang
 * @since 2020-10-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("fab_exchange_rate")
@ApiModel(value="ErpCurrencyAccount对象", description="币种记账")
public class ErpCurrencyAccount extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "币种id")
    @TableField("currency_id")
    private Integer currencyId;

    @ApiModelProperty(value = "类型1:日汇率2:月汇率")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "年份")
    @TableField("year")
    private Integer year;

    @ApiModelProperty(value = "月份")
    @TableField("month")
    private Integer month;

    @ApiModelProperty(value = "日期")
    @TableField("date")
    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
    private Date date;

    @ApiModelProperty(value = "日期描述")
    @TableField("date_title")
    private String dateTitle;

    @ApiModelProperty(value = "记账汇率")
    @TableField("exchange_rate")
    private BigDecimal exchangeRate;

    @ApiModelProperty("调整汇率")
    @TableField("adjust_exchange_rate")
    private BigDecimal adjustExchangeRate;
}
